﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using NextCMS.Models;

/// <summary>
/// Summary description for LoginLink
/// </summary>
/// 
namespace Modules
{
    public class LoginLink : IPageModule
    {
        public string GetLayoutModeHTML(PageModuleModel pmm, ModuleModel mm, int UserLanguageId)
        {
            string url = VirtualPathUtility.ToAbsolute(mm.Settings);
            string width = "250";
            string height = "150";
            url = url + "?Id=" + pmm.RefId + "&PageModuleId=" + pmm.Id + "";
            return "<div class='Module' onclick='javascript:OpenEditModuleDialog(\"" + mm.Code + "\"," + pmm.RefId + "," + pmm.Id + ",\"" + url + "\"," + width + "," + height + ");'>" + mm.Name + "</div>";
        }

        public string GetViewModeHTML(PageModuleModel pmm, ModuleModel mm, int UserLanguageId)
        {
            return "<%@ Register src=\"Modules/LoginLink/LoginLink.ascx\" tagname=\"LoginLink" + pmm.Id + "\" tagprefix=\"uc1\" %><uc1:LoginLink" + pmm.Id + " ID=\"LoginLink" + pmm.Id + "\" runat=\"server\" />";
        }
    }
}